/*
package com.zczc.web.config;


import com.yishuifengxiao.common.tool.format.LocalDateFormatter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.format.FormatterRegistry;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import org.springframework.web.filter.CorsFilter;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

*/
/**
 * @Author:Mark
 * @Description:
 * @Date: Created on 13:55 2018-12-13
 * @Modify by:
 *//*

@Configuration
*/
/*@ComponentScan("com.zczc.web.controller")*//*

@EnableWebMvc
public class WebConfig implements WebMvcConfigurer {

  @Override
  public void addFormatters(FormatterRegistry registry) {
    registry.addFormatter(new LocalDateFormatter("yyyy-MM-dd HH:mm:ss"));
  }

  */
/**
   * cors协议支持
   * @return
   *//*

  @Bean
  public WebMvcConfigurer corsConfigurer(){
    return new WebMvcConfigurer() {
      @Override
      public void addCorsMappings(CorsRegistry registry) {
        registry.addMapping("/**").allowedOrigins("*").allowedHeaders("HEAD","GET","PUT","POST","DELETE")
            .allowedHeaders("*").allowCredentials(true);
      }
    };
  }

  */
/**
   * 解决跨域问题
   * @return
   *//*

  @Bean
  public CorsFilter corsFilter(){
    UrlBasedCorsConfigurationSource source=new UrlBasedCorsConfigurationSource();
    CorsConfiguration configuration=new CorsConfiguration();
    configuration.addAllowedHeader("*");
    configuration.addAllowedOrigin("*");
    configuration.addAllowedMethod("*");
    source.registerCorsConfiguration("/**",configuration);
    return new CorsFilter(source);
  }


}
*/
